const http = require("http");
const url = require("url");

var reqUrl = "http://localhost:8081/";

var options = url.parse(reqUrl);
options.method = "POST";

var reqObj = http.request(options, (res) => {

});

var userName = process.argv[2];
var pwd = process.argv[3];
var userInfor = {userName: userName, pwd: pwd};
var userStr = JSON.stringify(userInfor);
reqObj.write(userStr); //向请求体写入数据
reqObj.end();
